const items = [1, 2, 3, 4, 5];

let sum = 0;
// for (let item of items) {
//   sum += item;
// }
sum = items.reduce((acc, item) => acc + item, 0);

console.log(sum);
